home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 August: Tool Chest / Dev.CD Aug 00 TC Disk 1.toast / pc / sample code / files / standard file / standardgetfolder / morefiles.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-06-23  |  42.2 KB  |  1,245 lines

  1. /*
  2.     File:        MoreFiles.h
  3.     
  4.     Description:The long lost high-level and FSSpec File Manager functions.
  5.  
  6.     Author:        JL
  7.  
  8.     Copyright:     Copyright: © 1992-1999 by Apple Computer, Inc.
  9.                 all rights reserved.
  10.     
  11.     Disclaimer:    You may incorporate this sample code into your applications without
  12.                 restriction, though the sample code has been provided "AS IS" and the
  13.                 responsibility for its operation is 100% yours.  However, what you are
  14.                 not permitted to do is to redistribute the source as "DSC Sample Code"
  15.                 after having made changes. If you're going to re-distribute the source,
  16.                 we require that you make it clear in the source that the code was
  17.                 descended from Apple Sample Code, but that you've made changes.
  18.     
  19.     Change History (most recent first):
  20.                 6/25/99    Updated for Metrowerks Codewarror Pro 2.1(KG)
  21.  
  22. */
  23.  
  24.  
  25. #ifndef __MOREFILES__
  26. #define __MOREFILES__
  27.  
  28. #include <Types.h>
  29. #include <Files.h>
  30.  
  31. #include "Optimization.h"
  32.  
  33. #ifdef __cplusplus
  34. extern "C" {
  35. #endif
  36.  
  37. /*****************************************************************************/
  38.  
  39. pascal    OSErr    HGetVolParms(ConstStr255Param volName,
  40.                              short vRefNum,
  41.                              GetVolParmsInfoBuffer *volParmsInfo,
  42.                              long *infoSize);
  43. /*    ¶ Determine the characteristics of a volume.
  44.     The HGetVolParms function returns information about the characteristics
  45.     of a volume. A result of paramErr usually just means the volume doesn't
  46.     support PBHGetVolParms and the feature you were going to check
  47.     for isn't available.
  48.  
  49.     volName            input:    A pointer to the name of a mounted volume
  50.                             or nil.
  51.     vRefNum            input:    Volume specification.
  52.     volParmsInfo    input:    Pointer to GetVolParmsInfoBuffer where the
  53.                             volume attributes information is returned.
  54.                     output:    Atributes information.
  55.     infoSize        input:    Size of buffer pointed to by volParmsInfo.
  56.                     output: Size of data actually returned.
  57.     
  58.     Result Codes
  59.         noErr                0        No error
  60.         nsvErr                -35        Volume not found
  61.         paramErr            -50        Volume doesn't support this function
  62.     
  63.     __________
  64.     
  65.     Also see the macros for checking attribute bits in MoreFilesExtras.h
  66. */
  67.  
  68. /*****************************************************************************/
  69.  
  70. pascal    OSErr    HCreateMinimum(short vRefNum,
  71.                                long dirID,
  72.                                ConstStr255Param fileName);
  73. /*    ¶ Create a new file with no creator or file type.
  74.     The HCreateMinimum function creates a new file without attempting to set
  75.     the creator and file type of the new file.  This function is needed to
  76.     create a file in an AppleShare "drop box" where the user can make
  77.     changes, but cannot see folder or files.
  78.     
  79.     vRefNum        input:    Volume specification.
  80.     dirID        input:    Directory ID.
  81.     fileName    input:    The name of the new file.
  82.     
  83.     Result Codes
  84.         noErr                0        No error
  85.         dirFulErr            -33        File directory full
  86.         dskFulErr            -34        Disk is full
  87.         nsvErr                -35        No such volume
  88.         ioErr                -36        I/O error
  89.         bdNamErr            -37        Bad filename
  90.         fnfErr                -43        Directory not found or incomplete pathname
  91.         wPrErr                -44        Hardware volume lock
  92.         vLckdErr            -46        Software volume lock
  93.         dupFNErr            -48        Duplicate filename and version
  94.         dirNFErrdirNFErr    -120    Directory not found or incomplete pathname
  95.         afpAccessDenied        -5000    User does not have the correct access
  96.         afpObjectTypeErr    -5025    A directory exists with that name
  97.     
  98.     __________
  99.     
  100.     Also see:    FSpCreateMinimum
  101. */
  102.  
  103. /*****************************************************************************/
  104.  
  105. pascal    OSErr    FSpCreateMinimum(const FSSpec *spec);
  106. /*    ¶ Create a new file with no creator or file type.
  107.     The FSpCreateMinimum function creates a new file without attempting to set 
  108.     the the creator and file type of the new file.  This function is needed to
  109.     create a file in an AppleShare "dropbox" where the user can make
  110.     changes, but cannot see folder or files. 
  111.     
  112.     spec        input:    An FSSpec record specifying the file to create.
  113.     
  114.     Result Codes
  115.         noErr                0        No error
  116.         dirFulErr            -33        File directory full
  117.         dskFulErr            -34        Disk is full
  118.         nsvErr                -35        No such volume
  119.         ioErr                -36        I/O error
  120.         bdNamErr            -37        Bad filename
  121.         fnfErr                -43        Directory not found or incomplete pathname
  122.         wPrErr                -44        Hardware volume lock
  123.         vLckdErr            -46        Software volume lock
  124.         dupFNErr            -48        Duplicate filename and version
  125.         dirNFErrdirNFErr    -120    Directory not found or incomplete pathname
  126.         afpAccessDenied        -5000    User does not have the correct access
  127.         afpObjectTypeErr    -5025    A directory exists with that name
  128.     
  129.     __________
  130.     
  131.     Also see:    HCreateMinimum
  132. */
  133.  
  134. /*****************************************************************************/
  135.  
  136. pascal    OSErr    ExchangeFiles(short vRefNum,
  137.                               long srcDirID,
  138.                               ConstStr255Param srcName,
  139.                               long dstDirID,
  140.                               ConstStr255Param dstName);
  141. /*    ¶ Exchange the data stored in two files on the same volume.
  142.     The ExchangeFiles function swaps the data in two files on the same
  143.     volume by changing some of the information in the volume catalog and,
  144.     if the files are open, in the file control blocks.
  145.  
  146.     vRefNum        input:    Volume specification.
  147.     srcDirID    input:    Source directory ID.
  148.     srcName        input:    Source file name.
  149.     dstDirID    input:    Destination directory ID.
  150.     dstName        input:    Destination file name.
  151.     
  152.     Result Codes
  153.         noErr                0        No error
  154.         nsvErr                -35        Volume not found
  155.         ioErr                -36        I/O error
  156.         fnfErr                -43        File not found
  157.         fLckdErr            -45        File is locked
  158.         vLckdErr            -46        Volume is locked or read-only
  159.         paramErr            -50        Function not supported by volume
  160.         volOfflinErr        -53        Volume is offline
  161.         wrgVolTypErr        -123    Not an HFS volume
  162.         diffVolErr            -1303    Files on different volumes
  163.         afpAccessDenied        -5000    User does not have the correct access
  164.         afpObjectTypeErr    -5025    Object is a directory, not a file
  165.         afpSameObjectErr    -5038    Source and destination are the same
  166.  
  167.     __________
  168.     
  169.     Also see:    FSpExchangeFilesCompat
  170. */
  171.  
  172. /*****************************************************************************/
  173.  
  174. pascal    OSErr    ResolveFileIDRef(ConstStr255Param volName,
  175.                                  short vRefNum,
  176.                                  long fileID,
  177.                                  long *parID,
  178.                                  StringPtr fileName);
  179. /*    ¶ Retrieve the location of the file with the specified file ID reference.
  180.     The ResolveFileIDRef function returns the filename and parent directory ID
  181.     of the file with the specified file ID reference.
  182.     
  183.     volName    input:    A pointer to the name of a mounted volume
  184.                     or nil.
  185.     vRefNum    input:    Volume specification.
  186.     fileID    input:    The file ID reference.
  187.     parID    output:    The parent directory ID of the file.
  188.     name    input:    Points to a buffer (minimum Str63) where the filename
  189.                     is to be returned or must be nil.
  190.             output:    The filename.
  191.     
  192.     Result Codes
  193.         noErr                0        No error
  194.         nsvErr                -35        Volume not found
  195.         ioErr                -36        I/O error
  196.         fnfErr                -43        File not found
  197.         paramErr            -50        Function not supported by volume
  198.         volOfflinErr        -53        Volume is offline
  199.         extFSErr            -58        External file system error - no file
  200.                                     system claimed this call.
  201.         wrgVolTypErr        -123    Not an HFS volume
  202.         fidNotFoundErr        -1300    File ID reference not found
  203.         notAFileErr            -1302    Specified file is a directory
  204.         afpAccessDenied        -5000    User does not have the correct access
  205.         afpObjectTypeErr    -5025    Specified file is a directory
  206.         afpIDNotFound        -5034    File ID reference not found
  207.         afpBadIDErr            -5039    File ID reference not found
  208.     
  209.     __________
  210.     
  211.     Also see:    FSpResolveFileIDRef, CreateFileIDRef, FSpCreateFileIDRef,
  212.                 DeleteFileIDRef
  213. */
  214.  
  215. /*****************************************************************************/
  216.  
  217. pascal    OSErr    FSpResolveFileIDRef(ConstStr255Param volName,
  218.                                     short vRefNum,
  219.                                     long fileID,
  220.                                     FSSpecPtr spec);
  221. /*    ¶ Retrieve the location of the file with the specified file ID reference.
  222.     The FSpResolveFileIDRef function fills in an FSSpec with the location
  223.     of the file with the specified file ID reference.
  224.     
  225.     volName    input:    A pointer to the name of a mounted volume
  226.                     or nil.
  227.     vRefNum    input:    Volume specification.
  228.     fileID    input:    The file ID reference.
  229.     spec    input:    A pointer to a FSSpec record.
  230.             output:    A file system specification to be filled in by
  231.                     FSpResolveFileIDRef.
  232.     
  233.     Result Codes
  234.         noErr                0        No error
  235.         nsvErr                -35        Volume not found
  236.         ioErr                -36        I/O error
  237.         fnfErr                -43        File not found
  238.         paramErr            -50        Function not supported by volume or
  239.                                     no default volume
  240.         volOfflinErr        -53        Volume is offline
  241.         extFSErr            -58        External file system error - no file
  242.                                     system claimed this call.
  243.         wrgVolTypErr        -123    Not an HFS volume
  244.         fidNotFoundErr        -1300    File ID reference not found
  245.         notAFileErr            -1302    Specified file is a directory
  246.         afpAccessDenied        -5000    User does not have the correct access
  247.         afpObjectTypeErr    -5025    Specified file is a directory
  248.         afpIDNotFound        -5034    File ID reference not found
  249.         afpBadIDErr            -5039    File ID reference not found
  250.     
  251.     __________
  252.     
  253.     Also see:    ResolveFileIDRef, CreateFileIDRef, FSpCreateFileIDRef,
  254.                 DeleteFileIDRef
  255. */
  256.  
  257. /*****************************************************************************/
  258.  
  259. pascal    OSErr    CreateFileIDRef(short vRefNum,
  260.                                 long parID,
  261.                                 ConstStr255Param fileName,
  262.                                 long *fileID);
  263. /*    ¶ Establish a file ID reference for a file.
  264.     The CreateFileIDRef function creates a file ID reference for the
  265.     specified file, or if a file ID reference already exists, supplies
  266.     the file ID reference and returns the result code fidExists or afpIDExists.
  267.  
  268.     vRefNum        input:    Volume specification.
  269.     parID        input:    Directory ID.
  270.     fileName    input:    The name of the file.
  271.     fileID        output:    The file ID reference (if result is noErr,
  272.                         fidExists, or afpIDExists).
  273.     
  274.     Result Codes
  275.         noErr                0        No error
  276.         nsvErr                -35        Volume not found
  277.         ioErr                -36        I/O error
  278.         fnfErr                -43        File not found
  279.         wPrErr                -44        Hardware volume lock
  280.         vLckdErr            -46        Software volume lock
  281.         paramErr            -50        Function not supported by volume
  282.         volOfflinErr        -53        Volume is offline
  283.         extFSErr            -58        External file system error - no file
  284.                                     system claimed this call.
  285.         wrgVolTypErr        -123    Not an HFS volume
  286.         fidExists            -1301    File ID reference already exists
  287.         notAFileErrn        -1302    Specified file is a directory
  288.         afpAccessDenied        -5000    User does not have the correct access
  289.         afpObjectTypeErr    -5025    Specified file is a directory
  290.         afpIDExists            -5035    File ID reference already exists
  291.     
  292.     __________
  293.     
  294.     Also see:    FSpResolveFileIDRef, ResolveFileIDRef, FSpCreateFileIDRef,
  295.                 DeleteFileIDRef
  296. */
  297.  
  298. /*****************************************************************************/
  299.  
  300. pascal    OSErr    FSpCreateFileIDRef(const FSSpec *spec,
  301.                                    long *fileID);
  302. /*    ¶ Establish a file ID reference for a file.
  303.     The FSpCreateFileIDRef function creates a file ID reference for the
  304.     specified file, or if a file ID reference already exists, supplies
  305.     the file ID reference and returns the result code fidExists or afpIDExists.
  306.  
  307.     spec        input:    An FSSpec record specifying the file.
  308.     fileID        output:    The file ID reference (if result is noErr,
  309.                         fidExists, or afpIDExists).
  310.     
  311.     Result Codes
  312.         noErr                0        No error
  313.         nsvErr                -35        Volume not found
  314.         ioErr                -36        I/O error
  315.         fnfErr                -43        File not found
  316.         wPrErr                -44        Hardware volume lock
  317.         vLckdErr            -46        Software volume lock
  318.         paramErr            -50        Function not supported by volume
  319.         volOfflinErr        -53        Volume is offline
  320.         extFSErr            -58        External file system error - no file
  321.                                     system claimed this call.
  322.         wrgVolTypErr        -123    Not an HFS volume
  323.         fidExists            -1301    File ID reference already exists
  324.         notAFileErrn        -1302    Specified file is a directory
  325.         afpAccessDenied        -5000    User does not have the correct access
  326.         afpObjectTypeErr    -5025    Specified file is a directory
  327.         afpIDExists            -5035    File ID reference already exists
  328.     
  329.     __________
  330.     
  331.     Also see:    FSpResolveFileIDRef, ResolveFileIDRef, CreateFileIDRef,
  332.                 DeleteFileIDRef
  333. */
  334.  
  335. /*****************************************************************************/
  336.  
  337. pascal    OSErr    DeleteFileIDRef(ConstStr255Param volName,
  338.                                 short vRefNum,
  339.                                 long fileID);
  340. /*    ¶ Delete a file ID reference.
  341.     The DeleteFileIDRef function deletes a file ID reference.
  342.  
  343.     volName    input:    A pointer to the name of a mounted volume
  344.                     or nil.
  345.     vRefNum    input:    Volume specification.
  346.     fileID    input:    The file ID reference.
  347.     
  348.     Result Codes
  349.         noErr                0        No error
  350.         nsvErr                -35        Volume not found
  351.         ioErr                -36        I/O error
  352.         fnfErr                -43        File not found
  353.         wPrErr                -44        Hardware volume lock
  354.         vLckdErr            -46        Software volume lock
  355.         paramErr            -50        Function not supported by volume
  356.         volOfflinErr        -53        Volume is offline
  357.         extFSErr            -58        External file system error - no file
  358.                                     system claimed this call.
  359.         wrgVolTypErr        -123    Function is not supported by volume
  360.         fidNotFoundErr        -1300    File ID reference not found
  361.         afpAccessDenied        -5000    User does not have the correct access
  362.         afpObjectTypeErr    -5025    Specified file is a directory
  363.         afpIDNotFound        -5034    File ID reference not found
  364.     
  365.     __________
  366.     
  367.     Also see:    FSpResolveFileIDRef, ResolveFileIDRef, CreateFileIDRef,
  368.                 FSpCreateFileIDRef
  369. */
  370.  
  371. /*****************************************************************************/
  372.  
  373. pascal    OSErr    FlushFile(short refNum);
  374. /*    ¶ Write the contents of a file's access path buffer (the fork data).
  375.     The FlushFile function writes the contents of a file's access path
  376.     buffer (the fork data) to the volume. Note: some of the file's catalog
  377.     information stored on the volume may not be correct until FlushVol
  378.     is called.
  379.  
  380.     refNum    input:    The file reference number of an open file.
  381.     
  382.     Result Codes
  383.         noErr                0        No error
  384.         nsvErr                -35        Volume not found
  385.         ioErr                 -36        I/O error
  386.         fnOpnErr            -38        File not open
  387.         fnfErr                -43        File not found
  388.         rfNumErr            -51        Bad reference number
  389.         extFSErr            -58        External file system error - no file
  390.                                     system claimed this call.
  391. */
  392.  
  393. /*****************************************************************************/
  394.  
  395. pascal    OSErr    LockRange(short refNum,
  396.                           long rangeLength,
  397.                           long rangeStart);
  398. /*    ¶ Lock a portion of a file.
  399.     The LockRange function locks (denies access to) a portion of a file
  400.     that was opened with shared read/write permission.
  401.  
  402.     refNum        input:    The file reference number of an open file.
  403.     rangeLength    input:    The number of bytes in the range.
  404.     rangeStart    input:    The starting byte in the range to lock.
  405.     
  406.     Result Codes
  407.         noErr                0        No error
  408.         ioErr                -36        I/O error
  409.         fnOpnErr            -38        File not open
  410.         eofErr                -39        Logical end-of-file reached
  411.         fLckdErr            -45        File is locked by another user
  412.         paramErr            -50        Negative ioReqCount
  413.         rfNumErr            -51        Bad reference number
  414.         extFSErr            -58        External file system error - no file
  415.                                     system claimed this call.
  416.         volGoneErr            -124    Server volume has been disconnected
  417.         afpNoMoreLocks        -5015    No more ranges can be locked
  418.         afpRangeOverlap        -5021    Part of range is already locked
  419.  
  420.     __________
  421.     
  422.     Also see:    UnlockRange
  423. */
  424.  
  425. /*****************************************************************************/
  426.  
  427. pascal    OSErr    UnlockRange(short refNum,
  428.                             long rangeLength,
  429.                             long rangeStart);
  430. /*    ¶ Unlock a previously locked range.
  431.     The UnlockRange function unlocks (allows access to) a previously locked
  432.     portion of a file that was opened with shared read/write permission.
  433.  
  434.     refNum        input:    The file reference number of an open file.
  435.     rangeLength    input:    The number of bytes in the range.
  436.     rangeStart    input:    The starting byte in the range to unlock.
  437.     
  438.     Result Codes
  439.         noErr                0        No error
  440.         ioErr                -36        I/O error
  441.         fnOpnErr            -38        File not open
  442.         eofErr                -39        Logical end-of-file reached
  443.         paramErr            -50        Negative ioReqCount
  444.         rfNumErr            -51        Bad reference number
  445.         extFSErr            -58        External file system error - no file
  446.                                     system claimed this call.
  447.         volGoneErr            -124    Server volume has been disconnected
  448.         afpRangeNotLocked    -5020    Specified range was not locked
  449.  
  450.     __________
  451.     
  452.     Also see:    LockRange
  453. */
  454.  
  455. /*****************************************************************************/
  456.  
  457. pascal    OSErr    GetForeignPrivs(short vRefNum,
  458.                                 long dirID,
  459.                                 ConstStr255Param name,
  460.                                 void *foreignPrivBuffer,
  461.                                 long *foreignPrivSize,
  462.                                 long *foreignPrivInfo1,
  463.                                 long *foreignPrivInfo2,
  464.                                 long *foreignPrivInfo3,
  465.                                 long *foreignPrivInfo4);
  466. /*    ¶ Retrieve the native access-control information.
  467.     The GetForeignPrivs function retrieves the native access-control
  468.     information for a file or directory stored on a volume managed by
  469.     a foreign file system.
  470.     
  471.     vRefNum                input:    Volume specification.
  472.     dirID                input:    Directory ID.
  473.     name                input:    Pointer to object name, or nil when dirID
  474.                                 specifies a directory that's the object.
  475.     foreignPrivBuffer    input:    Pointer to buffer where the privilege
  476.                                 information is returned.
  477.                         output:    Privilege information.
  478.     foreignPrivSize        input:    Size of buffer pointed to by
  479.                                 foreignPrivBuffer.
  480.                         output: Amount of buffer actually used.
  481.     foreignPrivInfo1    output:    Information specific to privilege model.
  482.     foreignPrivInfo2    output:    Information specific to privilege model.
  483.     foreignPrivInfo3    output:    Information specific to privilege model.
  484.     foreignPrivInfo4    output:    Information specific to privilege model.
  485.     
  486.     Result Codes
  487.         noErr                0        No error
  488.         nsvErr                -35        Volume not found
  489.         paramErr            -50        Volume is HFS or MFS (that is, it has
  490.                                     no foreign privilege model), or foreign
  491.                                     volume does not support these calls
  492.     
  493.     __________
  494.     
  495.     Also see:    FSpGetForeignPrivs, SetForeignPrivs, FSpSetForeignPrivs
  496. */
  497.  
  498. /*****************************************************************************/
  499.  
  500. pascal    OSErr    FSpGetForeignPrivs(const FSSpec *spec,
  501.                                    void *foreignPrivBuffer,
  502.                                    long *foreignPrivSize,
  503.                                    long *foreignPrivInfo1,
  504.                                    long *foreignPrivInfo2,
  505.                                    long *foreignPrivInfo3,
  506.                                    long *foreignPrivInfo4);
  507. /*    ¶ Retrieve the native access-control information.
  508.     The FSpGetForeignPrivs function retrieves the native access-control
  509.     information for a file or directory stored on a volume managed by
  510.     a foreign file system.
  511.     
  512.     spec                input:    An FSSpec record specifying the object.
  513.     foreignPrivBuffer    input:    Pointer to buffer where the privilege
  514.                                 information is returned.
  515.                         output:    Privilege information.
  516.     foreignPrivSize        input:    Size of buffer pointed to by
  517.                                 foreignPrivBuffer.
  518.                         output: Amount of buffer actually used.
  519.     foreignPrivInfo1    output:    Information specific to privilege model.
  520.     foreignPrivInfo2    output:    Information specific to privilege model.
  521.     foreignPrivInfo3    output:    Information specific to privilege model.
  522.     foreignPrivInfo4    output:    Information specific to privilege model.
  523.     
  524.     Result Codes
  525.         noErr                0        No error
  526.         nsvErr                -35        Volume not found
  527.         paramErr            -50        Volume is HFS or MFS (that is, it has
  528.                                     no foreign privilege model), or foreign
  529.                                     volume does not support these calls
  530.     
  531.     __________
  532.     
  533.     Also see:    GetForeignPrivs, SetForeignPrivs, FSpSetForeignPrivs
  534. */
  535.  
  536. /*****************************************************************************/
  537.  
  538. pascal    OSErr    SetForeignPrivs(short vRefNum,
  539.                                 long dirID,
  540.                                 ConstStr255Param name,
  541.                                 const void *foreignPrivBuffer,
  542.                                 long *foreignPrivSize,
  543.                                 long foreignPrivInfo1,
  544.                                 long foreignPrivInfo2,
  545.                                 long foreignPrivInfo3,
  546.                                 long foreignPrivInfo4);
  547. /*    ¶ Change the native access-control information.
  548.     The SetForeignPrivs function changes the native access-control
  549.     information for a file or directory stored on a volume managed by
  550.     a foreign file system.
  551.     
  552.     vRefNum                input:    Volume specification.
  553.     dirID                input:    Directory ID.
  554.     name                input:    Pointer to object name, or nil when dirID
  555.                                 specifies a directory that's the object.
  556.     foreignPrivBuffer    input:    Pointer to privilege information buffer.
  557.     foreignPrivSize        input:    Size of buffer pointed to by
  558.                                 foreignPrivBuffer.
  559.                         output: Amount of buffer actually used.
  560.     foreignPrivInfo1    input:    Information specific to privilege model.
  561.     foreignPrivInfo2    input:    Information specific to privilege model.
  562.     foreignPrivInfo3    input:    Information specific to privilege model.
  563.     foreignPrivInfo4    input:    Information specific to privilege model.
  564.     
  565.     Result Codes
  566.         noErr                0        No error
  567.         nsvErr                -35        Volume not found
  568.         paramErr            -50        Volume is HFS or MFS (that is, it has
  569.                                     no foreign privilege model), or foreign
  570.                                     volume does not support these calls
  571.     
  572.     __________
  573.     
  574.     Also see:    GetForeignPrivs, FSpGetForeignPrivs, FSpSetForeignPrivs
  575. */
  576.  
  577. /*****************************************************************************/
  578.  
  579. pascal    OSErr    FSpSetForeignPrivs(const FSSpec *spec,
  580.                                    const void *foreignPrivBuffer,
  581.                                    long *foreignPrivSize,
  582.                                    long foreignPrivInfo1,
  583.                                    long foreignPrivInfo2,
  584.                                    long foreignPrivInfo3,
  585.                                    long foreignPrivInfo4);
  586. /*    ¶ Change the native access-control information.
  587.     The FSpSetForeignPrivs function changes the native access-control
  588.     information for a file or directory stored on a volume managed by
  589.     a foreign file system.
  590.     
  591.     spec                input:    An FSSpec record specifying the object.
  592.     foreignPrivBuffer    input:    Pointer to privilege information buffer.
  593.     foreignPrivSize        input:    Size of buffer pointed to by
  594.                                 foreignPrivBuffer.
  595.                         output: Amount of buffer actually used.
  596.     foreignPrivInfo1    input:    Information specific to privilege model.
  597.     foreignPrivInfo2    input:    Information specific to privilege model.
  598.     foreignPrivInfo3    input:    Information specific to privilege model.
  599.     foreignPrivInfo4    input:    Information specific to privilege model.
  600.     
  601.     Result Codes
  602.         noErr                0        No error
  603.         nsvErr                -35        Volume not found
  604.         paramErr            -50        Volume is HFS or MFS (that is, it has
  605.                                     no foreign privilege model), or foreign
  606.                                     volume does not support these calls
  607.     
  608.     __________
  609.     
  610.     Also see:    GetForeignPrivs, FSpGetForeignPrivs, SetForeignPrivs
  611. */
  612.  
  613. /*****************************************************************************/
  614.  
  615. pascal    OSErr    HGetLogInInfo(ConstStr255Param volName,
  616.                               short vRefNum,
  617.                               short *loginMethod,
  618.                               StringPtr userName);
  619. /*    ¶ Get the login method and user name used to log on to a shared volume.
  620.     The HGetLogInInfo function retrieves the login method and user name
  621.     used to log on to a particular shared volume.
  622.     
  623.     volName        input:    A pointer to the name of a mounted volume
  624.                         or nil.
  625.     vRefNum        input:    The volume reference number.
  626.     loginMethod    output:    The login method used (kNoUserAuthentication,
  627.                         kPassword, kEncryptPassword, or
  628.                         kTwoWayEncryptPassword).
  629.     userName    input:    Points to a buffer (minimum Str31) where the user
  630.                         name is to be returned or must be nil.
  631.                 output:    The user name.
  632.     
  633.     Result Codes
  634.         noErr                0        No error
  635.         nsvErr                -35        Specified volume doesn’t exist
  636.         paramErr            -50        Function not supported by volume
  637.     
  638.     __________
  639.     
  640.     Also see:    HGetDirAccess, FSpGetDirAccess, HSetDirAccess,
  641.                 FSpSetDirAccess, HMapName, HMapID
  642. */
  643.  
  644. /*****************************************************************************/
  645.  
  646. pascal    OSErr    HGetDirAccess(short vRefNum,
  647.                               long dirID,
  648.                               ConstStr255Param name,
  649.                               long *ownerID,
  650.                               long *groupID,
  651.                               long *accessRights);
  652. /*    ¶ Get a directory's access control information on a shared volume.
  653.     The HGetDirAccess function retrieves the directory access control
  654.     information for a directory on a shared volume.
  655.     
  656.     vRefNum            input:    Volume specification.
  657.     dirID            input:    Directory ID.
  658.     name            input:    Pointer to directory name, or nil if dirID
  659.                             specifies the directory.
  660.     ownerID            output:    The directory's owner ID.
  661.     groupID            output:    The directory's group ID or
  662.                             0 if no group affiliation.
  663.     accessRights    output:    The directory's access rights.
  664.     
  665.     Result Codes
  666.         noErr                0        No error
  667.         fnfErr                -43        Directory not found
  668.         paramErr            -50        Function not supported by volume
  669.         afpAccessDenied        -5000    User does not have the correct access
  670.                                     to the directory
  671.     
  672.     __________
  673.     
  674.     Also see:    HGetLogInInfo, FSpGetDirAccess, HSetDirAccess,
  675.                 FSpSetDirAccess, HMapName, HMapID
  676. */
  677.  
  678. /*****************************************************************************/
  679.  
  680. pascal    OSErr    FSpGetDirAccess(const FSSpec *spec,
  681.                                 long *ownerID,
  682.                                 long *groupID,
  683.                                 long *accessRights);
  684. /*    ¶ Get a directory's access control information on a shared volume.
  685.     The FSpGetDirAccess function retrieves the directory access control
  686.     information for a directory on a shared volume.
  687.     
  688.     spec            input:    An FSSpec record specifying the directory.
  689.     ownerID            output:    The directory's owner ID.
  690.     groupID            output:    The directory's group ID or
  691.                             0 if no group affiliation.
  692.     accessRights    output:    The directory's access rights.
  693.     
  694.     Result Codes
  695.         noErr                0        No error
  696.         fnfErr                -43        Directory not found
  697.         paramErr            -50        Function not supported by volume
  698.         afpAccessDenied        -5000    User does not have the correct access
  699.                                     to the directory
  700.     
  701.     __________
  702.     
  703.     Also see:    HGetLogInInfo, HGetDirAccess, HSetDirAccess,
  704.                 FSpSetDirAccess, HMapName, HMapID
  705. */
  706.  
  707. /*****************************************************************************/
  708.  
  709. pascal    OSErr    HSetDirAccess(short vRefNum,
  710.                               long dirID,
  711.                               ConstStr255Param name,
  712.                               long ownerID,
  713.                               long groupID,
  714.                               long accessRights);
  715. /*    ¶ Set a directory's access control information on a shared volume.
  716.     The HSetDirAccess function changes the directory access control
  717.     information for a directory on a shared volume. You must own a directory
  718.     to change its access control information.
  719.     
  720.     vRefNum            input:    Volume specification.
  721.     dirID            input:    Directory ID.
  722.     name            input:    Pointer to directory name, or nil if dirID
  723.                             specifies the directory.
  724.     ownerID            input:    The directory's owner ID.
  725.     groupID            input:    The directory's group ID or
  726.                             0 if no group affiliation.
  727.     accessRights    input:    The directory's access rights.
  728.     
  729.     Result Codes
  730.         noErr                0        No error
  731.         fnfErr                -43        Directory not found
  732.         vLckdErr            -46        Volume is locked or read-only
  733.         paramErr            -50        Parameter error
  734.         afpAccessDenied        -5000    User does not have the correct access
  735.                                     to the directory
  736.         afpObjectTypeErr    -5025    Object is a file, not a directory
  737.     
  738.     __________
  739.     
  740.     Also see:    HGetLogInInfo, HGetDirAccess, FSpGetDirAccess,
  741.                 FSpSetDirAccess, HMapName, HMapID
  742. */
  743.  
  744. /*****************************************************************************/
  745.  
  746. pascal    OSErr    FSpSetDirAccess(const FSSpec *spec,
  747.                                 long ownerID,
  748.                                 long groupID,
  749.                                 long accessRights);
  750. /*    ¶ Set a directory's access control information on a shared volume.
  751.     The FSpSetDirAccess function changes the directory access control
  752.     information for a directory on a shared volume. You must own a directory
  753.     to change its access control information.
  754.     
  755.     spec            input:    An FSSpec record specifying the directory.
  756.     ownerID            input:    The directory's owner ID.
  757.     groupID            input:    The directory's group ID or
  758.                             0 if no group affiliation.
  759.     accessRights    input:    The directory's access rights.
  760.     
  761.     Result Codes
  762.         noErr                0        No error
  763.         fnfErr                -43        Directory not found
  764.         vLckdErr            -46        Volume is locked or read-only
  765.         paramErr            -50        Parameter error
  766.         afpAccessDenied        -5000    User does not have the correct access
  767.                                     to the directory
  768.         afpObjectTypeErr    -5025    Object is a file, not a directory
  769.     
  770.     __________
  771.     
  772.     Also see:    HGetLogInInfo, HGetDirAccess, FSpGetDirAccess, HSetDirAccess,
  773.                 HMapName, HMapID
  774. */
  775.  
  776. /*****************************************************************************/
  777.  
  778. pascal    OSErr    HMapID(ConstStr255Param volName,
  779.                        short vRefNum,
  780.                        long ugID,
  781.                        short objType,
  782.                        StringPtr name);
  783. /*    ¶ Map a user or group ID to a user or group name.
  784.     The HMapID function determines the name of a user or group if you know
  785.     the user or group ID.
  786.     
  787.     volName        input:    A pointer to the name of a mounted volume
  788.                         or nil.
  789.     vRefNum        input:    Volume specification.
  790.     objType        input:    The mapping function code: 1 if you're mapping a
  791.                         user ID to a user name or 2 if you're mapping a
  792.                         group ID to a group name.
  793.     name        input:    Points to a buffer (minimum Str31) where the user
  794.                         or group name is to be returned or must be nil.
  795.                 output:    The user or group name.
  796.     
  797.     Result Codes
  798.         noErr                0        No error
  799.         fnfErr                -43        Unrecognizable owner or group name
  800.         paramErr            -50        Function not supported by volume
  801.     
  802.     __________
  803.     
  804.     Also see:    HGetLogInInfo, HGetDirAccess, FSpGetDirAccess, HSetDirAccess,
  805.                 FSpSetDirAccess, HMapName
  806. */
  807.  
  808. /*****************************************************************************/
  809.  
  810. pascal    OSErr    HMapName(ConstStr255Param volName,
  811.                          short vRefNum,
  812.                          ConstStr255Param name,
  813.                          short objType,
  814.                          long *ugID);
  815. /*    ¶ Map a user or group name to a user or group ID.
  816.     The HMapName function determines the user or group ID if you know the
  817.     user or group name.
  818.     
  819.     volName        input:    A pointer to the name of a mounted volume
  820.                         or nil.
  821.     vRefNum        input:    Volume specification.
  822.     name        input:    The user or group name.
  823.     objType        input:    The mapping function code: 3 if you're mapping a
  824.                         user name to a user ID or 4 if you're mapping a
  825.                         group name to a group ID.
  826.     ugID        output:    The user or group ID.
  827.  
  828.     Result Codes
  829.         noErr                0        No error
  830.         fnfErr                -43        Unrecognizable owner or group name
  831.         paramErr            -50        Function not supported by volume
  832.     
  833.     __________
  834.     
  835.     Also see:    HGetLogInInfo, HGetDirAccess, FSpGetDirAccess, HSetDirAccess,
  836.                 FSpSetDirAccess, HMapID
  837. */
  838.  
  839. /*****************************************************************************/
  840.  
  841. pascal    OSErr    HCopyFile(short srcVRefNum,
  842.                           long srcDirID,
  843.                           ConstStr255Param srcName,
  844.                           short dstVRefNum,
  845.                           long dstDirID,
  846.                           ConstStr255Param dstPathname,
  847.                           ConstStr255Param copyName);
  848. /*    ¶ Duplicate a file on a file server and optionally to rename it.
  849.     The HCopyFile function duplicates a file and optionally to renames it.
  850.     The source and destination volumes must be on the same file server.
  851.     This function instructs the server to copy the file.
  852.     
  853.     srcVRefNum    input:    Source volume specification.
  854.     srcDirID    input:    Source directory ID.
  855.     srcName        input:    Source file name.
  856.     dstVRefNum    input:    Destination volume specification.
  857.     dstDirID    input:    Destination directory ID.
  858.     dstPathname    input:    Pointer to destination directory name, or
  859.                         nil when dstDirID specifies a directory.
  860.     copyName    input:    Points to the new file name if the file is to be
  861.                         renamed or nil if the file isn't to be renamed.
  862.     
  863.     Result Codes
  864.         noErr                0        No error
  865.         dskFulErr            -34        Destination volume is full
  866.         fnfErr                -43        Source file not found, or destination
  867.                                     directory does not exist
  868.         vLckdErr             -46        Destination volume is read-only
  869.         fBsyErr                 -47        The source or destination file could
  870.                                     not be opened with the correct access
  871.                                     modes
  872.         dupFNErr            -48        Destination file already exists
  873.         paramErr            -50        Function not supported by volume
  874.         wrgVolTypErr        -123    Function not supported by volume
  875.         afpAccessDenied        -5000    The user does not have the right to
  876.                                     read the source or write to the
  877.                                     destination
  878.         afpDenyConflict        -5006    The source or destination file could
  879.                                     not be opened with the correct access
  880.                                     modes
  881.         afpObjectTypeErr    -5025    Source is a directory
  882.     
  883.     __________
  884.     
  885.     Also see:    FSpCopyFile, FileCopy, FSpFileCopy
  886. */
  887.  
  888. /*****************************************************************************/
  889.  
  890. pascal    OSErr    FSpCopyFile(const FSSpec *srcSpec,
  891.                             const FSSpec *dstSpec,
  892.                             ConstStr255Param copyName);
  893. /*    ¶ Duplicate a file on a file server and optionally to rename it.
  894.     The FSpCopyFile function duplicates a file and optionally to renames it.
  895.     The source and destination volumes must be on the same file server.
  896.     This function instructs the server to copy the file.
  897.     
  898.     srcSpec        input:    An FSSpec record specifying the source file.
  899.     dstSpec        input:    An FSSpec record specifying the destination
  900.                         directory.
  901.     copyName    input:    Points to the new file name if the file is to be
  902.                         renamed or nil if the file isn't to be renamed.
  903.     
  904.     Result Codes
  905.         noErr                0        No error
  906.         dskFulErr            -34        Destination volume is full
  907.         fnfErr                -43        Source file not found, or destination
  908.                                     directory does not exist
  909.         vLckdErr             -46        Destination volume is read-only
  910.         fBsyErr                 -47        The source or destination file could
  911.                                     not be opened with the correct access
  912.                                     modes
  913.         dupFNErr            -48        Destination file already exists
  914.         paramErr            -50        Function not supported by volume
  915.         wrgVolTypErr        -123    Function not supported by volume
  916.         afpAccessDenied        -5000    The user does not have the right to
  917.                                     read the source or write to the
  918.                                     destination
  919.         afpDenyConflict        -5006    The source or destination file could
  920.                                     not be opened with the correct access
  921.                                     modes
  922.         afpObjectTypeErr    -5025    Source is a directory
  923.     
  924.     __________
  925.     
  926.     Also see:    HCopyFile, FileCopy, FSpFileCopy
  927. */
  928.  
  929. /*****************************************************************************/
  930.  
  931. pascal    OSErr    HMoveRename(short vRefNum,
  932.                             long srcDirID,
  933.                             ConstStr255Param srcName,
  934.                             long dstDirID,
  935.                             ConstStr255Param dstpathName,
  936.                             ConstStr255Param copyName);
  937. /*    ¶ Move a file or directory on a file server and optionally to rename it.
  938.     The HMoveRename function moves a file or directory and optionally
  939.     renames it. The source and destination locations must be on the same
  940.     shared volume.
  941.     
  942.     vRefNum        input:    Volume specification.
  943.     srcDirID    input:    Source directory ID.
  944.     srcName        input:    The source object name.
  945.     dstDirID    input:    Destination directory ID.
  946.     dstName        input:    Pointer to destination directory name, or
  947.                         nil when dstDirID specifies a directory.
  948.     copyName    input:    Points to the new name if the object is to be
  949.                         renamed or nil if the object isn't to be renamed.
  950.     
  951.     Result Codes
  952.         noErr                0        No error
  953.         fnfErr                -43        Source file or directory not found
  954.         fLckdErr            -45        File is locked
  955.         vLckdErr            -46        Destination volume is read-only
  956.         dupFNErr            -48        Destination already exists
  957.         paramErr            -50        Function not supported by volume
  958.         badMovErr            -122    Attempted to move directory into
  959.                                     offspring
  960.         afpAccessDenied        -5000    The user does not have the right to
  961.                                     move the file  or directory
  962.     
  963.     __________
  964.     
  965.     Also see:    FSpMoveRename, HMoveRenameCompat, FSpMoveRenameCompat
  966. */
  967.  
  968. /*****************************************************************************/
  969.  
  970. pascal    OSErr    FSpMoveRename(const FSSpec *srcSpec,
  971.                               const FSSpec *dstSpec,
  972.                               ConstStr255Param copyName);
  973. /*    ¶ Move a file or directory on a file server and optionally to rename it.
  974.     The FSpMoveRename function moves a file or directory and optionally
  975.     renames it. The source and destination locations must be on the same
  976.     shared volume.
  977.     
  978.     srcSpec        input:    An FSSpec record specifying the source object.
  979.     dstSpec        input:    An FSSpec record specifying the destination
  980.                         directory.
  981.     copyName    input:    Points to the new name if the object is to be
  982.                         renamed or nil if the object isn't to be renamed.
  983.     
  984.     Result Codes
  985.         noErr                0        No error
  986.         fnfErr                -43        Source file or directory not found
  987.         fLckdErr            -45        File is locked
  988.         vLckdErr            -46        Destination volume is read-only
  989.         dupFNErr            -48        Destination already exists
  990.         paramErr            -50        Function not supported by volume
  991.         badMovErr            -122    Attempted to move directory into
  992.                                     offspring
  993.         afpAccessDenied        -5000    The user does not have the right to
  994.                                     move the file  or directory
  995.     
  996.     __________
  997.     
  998.     Also see:    HMoveRename, HMoveRenameCompat, FSpMoveRenameCompat
  999. */
  1000.  
  1001. /*****************************************************************************/
  1002.  
  1003. pascal    OSErr    GetVolMountInfoSize(ConstStr255Param volName,
  1004.                                     short vRefNum,
  1005.                                     short *size);
  1006. /*    ¶ Get the size of a volume mounting information record.
  1007.     The GetVolMountInfoSize function determines the how much space the
  1008.     program needs to allocate for a volume mounting information record.
  1009.     
  1010.     volName        input:    A pointer to the name of a mounted volume
  1011.                         or nil.
  1012.     vRefNum        input:    Volume specification.
  1013.     size        output:    The space needed (in bytes) of the volume mounting
  1014.                         information record.
  1015.     
  1016.     Result Codes
  1017.         noErr                0        No error
  1018.         nsvErr                -35        Volume not found
  1019.         paramErr            -50        Parameter error
  1020.         extFSErr            -58        External file system error - no file
  1021.                                     system claimed this call.
  1022.  
  1023.     __________
  1024.     
  1025.     Also see:    GetVolMountInfo, VolumeMount BuildAFPVolMountInfo,
  1026.                 RetrieveAFPVolMountInfo
  1027. */
  1028.  
  1029. /*****************************************************************************/
  1030.  
  1031. pascal    OSErr    GetVolMountInfo(ConstStr255Param volName,
  1032.                                 short vRefNum,
  1033.                                 void *volMountInfo);
  1034. /*    ¶ Retrieve a volume mounting information record.
  1035.     The GetVolMountInfo function retrieves a volume mounting information
  1036.     record containing all the information needed to mount the volume,
  1037.     except for passwords.
  1038.     
  1039.     volName            input:    A pointer to the name of a mounted volume
  1040.                             or nil.
  1041.     vRefNum            input:    Volume specification.
  1042.     volMountInfo    output:    Points to a volume mounting information
  1043.                             record where the mounting information is to
  1044.                             be returned.
  1045.     
  1046.     Result Codes
  1047.         noErr                0        No error    
  1048.         nsvErr                -35        Volume not found    
  1049.         paramErr            -50        Parameter error    
  1050.         extFSErr            -58        External file system error - no file
  1051.                                     system claimed this call.
  1052.  
  1053.     __________
  1054.     
  1055.     Also see:    GetVolMountInfoSize, VolumeMount, BuildAFPVolMountInfo,
  1056.                 RetrieveAFPVolMountInfo
  1057. */
  1058.  
  1059. /*****************************************************************************/
  1060.  
  1061. pascal    OSErr    VolumeMount(const void *volMountInfo,
  1062.                             short *vRefNum);
  1063. /*    ¶ Mount a volume using a volume mounting information record.
  1064.     The VolumeMount function mounts a volume using a volume mounting
  1065.     information record.
  1066.     
  1067.     volMountInfo    input:    Points to a volume mounting information record.
  1068.     vRefNum            output:    A volume reference number.
  1069.     
  1070.     Result Codes
  1071.         noErr                0        No error
  1072.         notOpenErr            -28        AppleTalk is not open
  1073.         nsvErr                -35        Volume not found
  1074.         paramErr            -50        Parameter error; typically, zone, server,
  1075.                                     and volume name combination is not valid
  1076.                                     or not complete, or the user name is not
  1077.                                     recognized
  1078.         extFSErr            -58        External file system error - no file
  1079.                                     system claimed this call.
  1080.         memFullErr            -108    Not enough memory to create a new volume
  1081.                                     control block for mounting the volume
  1082.         afpBadUAM            -5002    User authentication method is unknown
  1083.         afpBadVersNum        -5003    Workstation is using an AFP version that
  1084.                                     the server doesn’t recognize
  1085.         afpNoServer            -5016    Server is not responding
  1086.         afpUserNotAuth        -5023    User authentication failed (usually,
  1087.                                     password  is not correct)
  1088.         afpPwdExpired        -5042    Password has expired on server
  1089.         afpBadDirIDType        -5060    Not a fixed directory ID volume
  1090.         afpCantMountMoreSrvrs -5061    Maximum number of volumes has been
  1091.                                     mounted
  1092.         afpAlreadyMounted    -5062    Volume already mounted
  1093.         afpSameNodeErr        -5063    Attempt to log on to a server running
  1094.                                     on the same machine
  1095.  
  1096.     __________
  1097.     
  1098.     Also see:    GetVolMountInfoSize, GetVolMountInfo, BuildAFPVolMountInfo,
  1099.                 RetrieveAFPVolMountInfo
  1100. */
  1101.  
  1102. /*****************************************************************************/
  1103.  
  1104. pascal    OSErr    Share(short vRefNum,
  1105.                       long dirID,
  1106.                       ConstStr255Param name);
  1107. /*    ¶ Establish a local volume or directory as a share point.
  1108.     The Share function establishes a local volume or directory as a
  1109.     share point.
  1110.  
  1111.     vRefNum            input:    Volume specification.
  1112.     dirID            input:    Directory ID.
  1113.     name            input:    Pointer to directory name, or nil if dirID
  1114.                             specifies the directory.
  1115.     
  1116.     Result Codes
  1117.         noErr                0        No error    
  1118.         tmfoErr                -42        Too many share points    
  1119.         fnfErr                -43        File not found    
  1120.         dupFNErr            -48        Already a share point with this name    
  1121.         paramErr            -50        Function not supported by volume    
  1122.         dirNFErrdirNFErr    -120    Directory not found    
  1123.         afpAccessDenied        -5000    This directory cannot be shared    
  1124.         afpObjectTypeErr    -5025    Object was a file, not a directory    
  1125.         afpContainsSharedErr -5033    The directory contains a share point    
  1126.         afpInsideSharedErr    -5043    The directory is inside a shared directory    
  1127.  
  1128.     __________
  1129.     
  1130.     Also see:    FSpShare, Unshare, FSpUnshare
  1131. */
  1132.  
  1133. /*****************************************************************************/
  1134.  
  1135. pascal    OSErr    FSpShare(const FSSpec *spec);
  1136. /*    ¶ Establish a local volume or directory as a share point.
  1137.     The FSpShare function establishes a local volume or directory as a
  1138.     share point.
  1139.  
  1140.     spec    input:    An FSSpec record specifying the share point.
  1141.     
  1142.     Result Codes
  1143.         noErr                0        No error    
  1144.         tmfoErr                -42        Too many share points    
  1145.         fnfErr                -43        File not found    
  1146.         dupFNErr            -48        Already a share point with this name    
  1147.         paramErr            -50        Function not supported by volume    
  1148.         dirNFErrdirNFErr    -120    Directory not found    
  1149.         afpAccessDenied        -5000    This directory cannot be shared    
  1150.         afpObjectTypeErr    -5025    Object was a file, not a directory    
  1151.         afpContainsSharedErr -5033    The directory contains a share point    
  1152.         afpInsideSharedErr    -5043    The directory is inside a shared directory    
  1153.  
  1154.     __________
  1155.     
  1156.     Also see:    Share, Unshare, FSpUnshare
  1157. */
  1158.  
  1159. /*****************************************************************************/
  1160.  
  1161. pascal    OSErr    Unshare(short vRefNum,
  1162.                         long dirID,
  1163.                         ConstStr255Param name);
  1164. /*    ¶ Remove a share point.
  1165.     The Unshare function removes a share point.
  1166.  
  1167.     vRefNum            input:    Volume specification.
  1168.     dirID            input:    Directory ID.
  1169.     name            input:    Pointer to directory name, or nil if dirID
  1170.                             specifies the directory.
  1171.     
  1172.     Result Codes
  1173.         noErr                0        No error    
  1174.         fnfErr                -43        File not found    
  1175.         paramErr            -50        Function not supported by volume    
  1176.         dirNFErrdirNFErr    -120    Directory not found    
  1177.         afpObjectTypeErr    -5025    Object was a file, not a directory; or,
  1178.                                     this directory is not a share point    
  1179.  
  1180.     __________
  1181.     
  1182.     Also see:    Share, FSpShare, FSpUnshare
  1183. */
  1184.  
  1185. /*****************************************************************************/
  1186.  
  1187. pascal    OSErr    FSpUnshare(const FSSpec *spec);
  1188. /*    ¶ Remove a share point.
  1189.     The FSpUnshare function removes a share point.
  1190.  
  1191.     spec    input:    An FSSpec record specifying the share point.
  1192.     
  1193.     Result Codes
  1194.         noErr                0        No error    
  1195.         fnfErr                -43        File not found    
  1196.         paramErr            -50        Function not supported by volume    
  1197.         dirNFErrdirNFErr    -120    Directory not found    
  1198.         afpObjectTypeErr    -5025    Object was a file, not a directory; or,
  1199.                                     this directory is not a share point    
  1200.  
  1201.     __________
  1202.     
  1203.     Also see:    Share, FSpShare, Unshare
  1204. */
  1205.  
  1206. /*****************************************************************************/
  1207.  
  1208. pascal    OSErr    GetUGEntry(short objType,
  1209.                            StringPtr objName,
  1210.                            long *objID);
  1211. /*    ¶ Retrieve a user or group entry from the local file server.
  1212.     The GetUGEntry function retrieves user or group entries from the
  1213.     local file server.
  1214.  
  1215.     objType        input:    The object type: -1 = group; 0 = user
  1216.     objName        input:    Points to a buffer (minimum Str31) where the user
  1217.                         or group name is to be returned or must be nil.
  1218.                 output:    The user or group name.
  1219.     objID        input:    O to get the first user or group. If the entry objID
  1220.                         last returned by GetUGEntry is passed, then user or
  1221.                         group whose alphabetically next in the list of entries
  1222.                         is returned.
  1223.                 output:    The user or group ID.
  1224.     
  1225.     Result Codes
  1226.         noErr                0        No error    
  1227.         fnfErr                -43        No more users or groups    
  1228.         paramErr            -50        Function not supported; or, ioObjID is
  1229.                                     negative    
  1230.  
  1231.     __________
  1232.     
  1233.     Also see:    GetUGEntries
  1234. */
  1235.  
  1236. /*****************************************************************************/
  1237.  
  1238. #ifdef __cplusplus
  1239. }
  1240. #endif
  1241.  
  1242. #include "OptimizationEnd.h"
  1243.  
  1244. #endif    /* __MOREFILES__ */
  1245.